﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FrmSocketTest
{
    public class EventHelper
    {
        public delegate void EventHandlerData<T>(T t);

        private static event EventHandlerData<Domain.Entities.OperModel> modelData = null;

        /// <summary>
        /// 区域修改通知事件
        /// </summary>
        public static event EventHandlerData<Domain.Entities.OperModel> ModelData
        {
            add { modelData += value; }
            remove { modelData -= value; }
        }

        public static void FunModelData(Domain.Entities.OperModel model)
        {
            if (modelData != null)
            {
                modelData(model);
            }
        }
    }
}